<?php 
  @header("Content-Type:text/json;charset=utf-8");
  $conn=mysqli_connect("localhost:3306","root","root","2113xm");
  // $conn=mysqli_connect("b-84rkmk9uxdpn6k.bch.rds.gz.baidubce.com:3306","b_84rkmk9uxdpn6k","12345678","b_84rkmk9uxdpn6k");
  if(!conn){
     exit("数据库链接失败");
  }

  mysqli_query($conn,"set names utf8"); // 从数据库取数据时  将编码转为utf-8;  
  mysqli_query($conn,"set character set utf-8");
?>
